﻿using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;

namespace TimersXP
{
    /// <summary>
    /// This is the core of the application it will keep track of global settings, configurations, options, Skins paths, skins libraries,
    /// and all the other stuff that determines how the program will be used and look.
    /// </summary>
    /// <NOTE>This is a Sealed class therefore that makes this a singleton class.</NOTE>
    public sealed class TimersCore : INotifyPropertyChanged
    {
        /// <summary>The TimersCore singleton object.</summary>
        private static readonly TimersCore timersCore = new TimersCore();

        /// <summary>The skins library</summary>
        /// <NOTE>In the future the Skins might contain many different sub-libraries, and perhaps meta-data for skin genre's and skin categories or themes!</NOTE>
        /// <NOTE>But all of the skins should be broken down into this one skins library.</NOTE>
        private Skins skinsLibrary = new Skins();

        #region Constructors
        /// <summary>Prevents a default instance of the <see cref="TimersCore"/> class from being created.</summary>
        /// <NOTE>This is the constructor for the singleton class.</NOTE>
        private TimersCore()
        {
        }
        #endregion Constructors

        #region Properties
        /// <summary>Gets the timers core.</summary>
        /// <returns>The Timers Core</returns>
        public static TimersCore GetTimersCore()
        {
            return timersCore;
        }

        /// <summary>Gets or sets the skins library.</summary>
        /// <value>The skins library.</value>
        public Skins SkinsLibrary
        {
            get { return this.skinsLibrary; }
            set
            {
                if (this.skinsLibrary != value)
                {
                    this.skinsLibrary = value;
                    //OnPropertyChanged(() => this.SkinsLibrary);
                }
            }
        }
        #endregion Properties
    }
}
